<include file="Public:header" />
<div id="zoneHeader">
    <h2>前30名收入变化明细</h2>
</div><!--/#zoneHeader-->
<style>
.warn { background:red; color:#fff; } 
</style>
<div id="zoneBody" class="noFooter">
    <div id="zoneBodyContent">
        <table class="table2">
            <thead>
            <tr>
                <td>UID</td>
                <volist name="days" id="vo">
                <td>{$vo}</td>
                </volist>
            </tr>
            </thead>
            <tbody id="tbody_123">
            <volist name="records" id="vo">
            <tr>
                <td>{$key}</td>
                <volist name="vo" id="vo2">
                <td>{$vo2}</td>
                </volist>
            </tr>
            </volist>
            </tbody>
        </table>
    </div><!--/#zoneBodyContent-->
</div><!--/#zoneBody-->

<script>
$(function() {
    $('#tbody_123 tr').each(function() {
        var $o = $(this);

        $o.find('td').each(function() {
            var _index = $(this).index();

            if (_index < 1) {
                return;
            }

            var _prev = (_index < 2) ? null : $(this).prev().html(),
                _curr = $(this).html();

            _prev = parseFloat(_prev, 10);
            _curr = parseFloat(_curr, 10);

            if (isNaN(_prev) || isNaN(_curr)) {
                return;
            }

            if (_curr < _prev * 0.7) {
                $(this).addClass('warn');
            }
        })
    })
})
</script>

<include file="Public:footer" />
